package strings;

public class WU_FTPD {
	public static void site_exec(String cmd) {
		String PATH = "/home/ftp/bin";
		int sp = cmd.indexOf(' ');
		double dsp = java.lang.Math.log(sp + 2);
		int j;
		String result;
		if (dsp == 0) {
			j = cmd.lastIndexOf('/');
			if (j > -1)
				result = cmd.substring(j);
			else
				result = cmd;
		} else {
			j = cmd.lastIndexOf('/', sp);
			result = cmd.substring(j);
		}
		if (result.length() + PATH.length() > 32) {
			throw new RuntimeException("Buffer overflow");
		}
		String buf = PATH + result;
		execute(buf);
	}
	
	public static void execute(String buf){
		System.out.println(buf);
	}
	
	public static void main(String []args){
		WU_FTPD.site_exec("!!!!!!!!!!!!!!!!!!!!");
	}
}
